//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.restaurant.application.couponmanage.support;

import com.google.common.collect.Lists;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import com.nebutown.generation.basictype.UID;
import java.util.List;

public class CouponManageAndShopListData implements PickableBean {
    public static final String FN_SHOPUID = "shopUid";
    public static final String FN_SHOPNAME = "shopName";
    public static final List<String> FIELD_NAMES = Lists.newArrayList(new String[]{"shopUid", "shopName"});
    private UID shopUid;
    private String shopName;

    public CouponManageAndShopListData(UID shopUid, String shopName) {
        this.setShopUid(shopUid);
        this.setShopName(shopName);
    }

    public CouponManageAndShopListData() {
    }

    public CouponManageAndShopListData duplicate() {
        CouponManageAndShopListData result = new CouponManageAndShopListData();
        result.shopUid = this.shopUid;
        result.shopName = this.shopName;
        return result;
    }

    public String toString() {
        return Convert.toJson(this);
    }

    public UID getShopUid() {
        return this.shopUid;
    }

    public void setShopUid(UID value) {
        this.shopUid = value;
    }

    public CouponManageAndShopListData withShopUid(UID value) {
        this.setShopUid(value);
        return this;
    }

    public CouponManageAndShopListData withShopUid(UID value, UID defaultValue) {
        this.setShopUid(value == null ? defaultValue : value);
        return this;
    }

    public String getShopName() {
        return this.shopName;
    }

    public void setShopName(String value) {
        this.shopName = value;
    }

    public CouponManageAndShopListData withShopName(String value) {
        this.setShopName(value);
        return this;
    }

    public CouponManageAndShopListData withShopName(String value, String defaultValue) {
        this.setShopName(value == null ? defaultValue : value);
        return this;
    }

    public Object getValueOf(String name) {
        byte var3 = -1;
        switch(name.hashCode()) {
            case -345481567:
                if (name.equals("shopName")) {
                    var3 = 1;
                }
                break;
            case 2067072378:
                if (name.equals("shopUid")) {
                    var3 = 0;
                }
        }

        switch(var3) {
            case 0:
                return this.getShopUid();
            case 1:
                return this.getShopName();
            default:
                return null;
        }
    }

    public void setValueOf(String name, Object value) {
        byte var4 = -1;
        switch(name.hashCode()) {
            case -345481567:
                if (name.equals("shopName")) {
                    var4 = 1;
                }
                break;
            case 2067072378:
                if (name.equals("shopUid")) {
                    var4 = 0;
                }
        }

        switch(var4) {
            case 0:
                this.setShopUid((UID)value);
                return;
            case 1:
                this.setShopName((String)value);
                return;
            default:
        }
    }

    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }

    public int hashCode() {
        return this.signature().hashCode();
    }

    public boolean equals(Object o) {
        return !(o instanceof CouponManageAndShopListData) ? false : this.signature().equals(((CouponManageAndShopListData)o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean CouponManageAndShopListData has no signature defined, no hash code or equals possible.");
    }
}
